using System;
using System.Collections.Generic;
using System.Text;

namespace TfsSpam.Differ
{
    /// <summary>
    /// Data on one input file being compared.
    /// </summary>
    /// <remarks>
    /// This class is part of the code for the <see cref="Diff"/> class.
    /// Copyright (c) by Matthias Hertel, http://www.mathertel.de
    /// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
    /// </remarks>
    internal class DiffData
    {
        /// <summary>
        /// Number of elements (lines).
        /// </summary>
        internal int Length;

        /// <summary>
        /// Buffer of numbers that will be compared.
        /// </summary>
        internal int[] data;

        /// <summary>
        /// Array of booleans that flag for modified data.
        /// This is the result of the diff.
        /// This means deletedA in the first Data or inserted in the second Data.
        /// </summary>
        internal bool[] modified;

        /// <summary>
        /// Initialize the Diff-Data buffer.
        /// </summary>
        /// <param name="data">reference to the buffer</param>
        internal DiffData( int[] initData )
        {
            data = initData;
            Length = initData.Length;
            modified = new bool[ Length + 2 ];
        } // DiffData

    } // class DiffData
}
